package com.scud.order.mapper;

import com.scud.model.order.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderMapper {
    //根据订单id查询订单信息
    Order selectById(Long orderId);

    void addOrder(Order order);

    void updateOrderStatus(@Param("id") Long id,@Param("status") int status);

    //根据用户id查询订单列表
    List<Order> selectByUserId(Long userId);

    //设置支付时间
    void setPayTime(LocalDateTime now,Long orderId);
}
